﻿@using vwsol_DuHoc.Areas.Administrator.Models
@model Class

<style type="text/css">
    .alert
    {
    	display:none;
    }
</style>

<script type="text/javascript">
    $(document).ready(function () {
        ShowArlert();
    });

    function ShowArlert() {
        var Error = '@ViewBag.Error';
        if (Error != '')
            $(".alert-error").show();
        var Success = '@ViewBag.Success';
        if (Success != '')
            $(".alert-success").show();
        var Warning = '@ViewBag.Warning';
        if (Warning != '')
            $(".alert-info").show();
    }
</script>

<div class="page-header">
    <div class="icon">
        <span class="ico-pen-2"></span>
    </div>
    <h1>
        Mở lớp học <small>VWSOL METRO STYLE ADMIN PANEL</small></h1>
</div>
<div class="row-fluid">
    <div class="block">
        <div class="alert alert-error">            
            <strong>@ViewBag.Error</strong>
        </div>
        <div class="alert alert-success">            
            <strong>@ViewBag.Success</strong>
        </div>            
        <div class="alert alert-info">            
            <strong>@ViewBag.Warning</strong>
        </div>
        <div class="head">                                
            <h2>Thông tin lớp học</h2>
            <ul class="buttons">             
                <li><a href="javascript:void(0)"><div class="icon"><span class="ico-info"></span></div></a></li>
            </ul>                                  
        </div>
        @using (Html.BeginForm("CreateClass", "AdminClass", FormMethod.Post, new { id = "validate", enctype = "multipart/form-data" }))
        {
            <div class="data-fluid">
                <div class="span6">
                    <div class="row-form">
                        <div class="span3">Tên lớp học:</div>
                        <div class="span9"><input id="ClassName" name="ClassName" type="text" class="validate[required]" value="@Model.ClassName"/></div>
                    </div>
                    <div class="row-form">
                        <div class="span3">Khóa học:</div>
                        <div class="span9">
                            <select id="CourseID" name="CourseID" class="validate[required]" style="width: 100%;">
                                <option value=""></option>
                                @foreach (Course item in (List<Course>)ViewData["CourseList"])
                                {
                                    <option value="@item.CourseID">@item.CourseName</option>
                                }                                                                      
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        }
    </div>
</div>